Method for resource allocation and terminal device

ABSTRACT

A method for resource allocation and a terminal device are provided. The method includes the following. System-state information of a terminal device is acquired, and the terminal device has a target application running in a foreground of the terminal device. An internal running scenario of the target application is determined according to the system-state information. A performance improvement strategy corresponding to the internal running scenario is acquired. Allocation of system resources for the internal running scenario is adjusted according to the performance improvement strategy.

CROSS-REFERENCE TO RELATED APPLICATION(S)

This application claims priority to Chinese Patent Application No.201711043202.4, filed on Oct. 31, 2017, the content of which is herebyincorporated by reference in its entirety.

TECHNICAL FIELD

This disclosure relates to the field of terminal device technology, andparticularly to a method for resource allocation and a terminal device.

BACKGROUND

With the rapid development of technologies relating to terminal devices,an increasing number of applications are installed in mobile phones ofusers, such as reading applications, payment applications, gameapplications, music applications, and the like. People's daily life isclosely linked with the mobile phones.

SUMMARY

Implementations of the disclosure provide a method for resourceallocation.

According to a first aspect of the implementations of the disclosure, amethod for resource allocation is provided. The method is applicable toa terminal device. An operating system and at least one application runin the terminal device. The method includes the following.

The operating system acquires system-state information of the terminaldevice, where the system-state information is state information of theterminal device that can be detected by the operating system and theterminal device has a target application running in a foreground of theterminal device. The operating system determines an internal runningscenario of the target application according to the system-stateinformation. The operating system acquires a performance improvementstrategy corresponding to the internal running scenario. The operatingsystem adjusts allocation of system resources for the internal runningscenario according to the performance improvement strategy.

According to a second aspect of the implementations of the disclosure, aterminal device is provided, where the terminal device includes at leastone processor and a computer readable storage coupled to the at leastone processor. The computer readable storage is configured to store atleast one computer executable instruction thereon which, when executedby the at least one processor, cause the at least one processor to carryout following actions.

System-state information of the terminal device is acquired by anoperating system of the terminal device. The system-state information isstate information of the terminal device that can be detected by theoperating system and the terminal device has a target applicationrunning in a foreground of the terminal device. An internal runningscenario of the target application is determined by the operating systemaccording to the system-state information. A performance improvementstrategy is acquired by the operating system corresponding to theinternal running scenario. Allocation of system resources for theinternal running scenario is adjusted by the operating system accordingto the performance improvement strategy.

According to a third aspect of the disclosure, there is provided anon-transitory computer-readable storage medium storing a computerprogram which, when executed by a processor, cause the processor tocarry out following actions.

System-state information of the terminal device is acquired by anoperating system of a terminal device. The system-state information isstate information of the terminal device that can be detected by theoperating system and the terminal device has a target applicationrunning in a foreground of the terminal device. An internal runningscenario of the target application is determined by the operating systemaccording to the system-state information. A performance improvementstrategy is acquired by the operating system corresponding to theinternal running scenario. Allocation of system resources for theinternal running scenario is adjusted by the operating system accordingto the performance improvement strategy.

BRIEF DESCRIPTION OF THE DRAWINGS

The following briefly introduces the accompanying drawings required fordescribing the implementations.

FIG. 1A is a schematic diagram illustrating a program space for runningprograms of a smart phone.

FIG. 1B is a schematic diagram illustrating a system architecture of anAndroid system.

FIG. 2 is a schematic flow chart illustrating a method for resourceallocation according to an implementation of the present disclosure.

FIG. 3A is a schematic flow chart illustrating a method for resourceallocation according to an implementation of the present disclosure.

FIG. 3B is a schematic flow chart illustrating a method for resourceallocation according to an implementation of the present disclosure.

FIG. 3C is a schematic flow chart illustrating a method for resourceallocation according to an implementation of the present disclosure.

FIG. 4 is a schematic flow chart illustrating a method for resourceallocation according to an implementation of the present disclosure.

FIG. 5 is a schematic structural diagram illustrating a terminal deviceaccording to an implementation of the present disclosure.

FIG. 6 is a block diagram illustrating functional units of a terminaldevice according to an implementation of the present disclosure.

FIG. 7 is a schematic structural diagram illustrating a smart phoneaccording to an implementation of the present disclosure.

DETAILED DESCRIPTION

In order to enable those skilled in the art to better understandsolutions of the present disclosure, technical solutions inimplementations of the present disclosure will be described clearly andcompletely hereinafter with reference to the accompanying drawings inthe implementations of the present disclosure. Apparently, the describedimplementations are merely some rather than all implementations of thepresent disclosure. All other implementations obtained by those ofordinary skill in the art based on the implementations of the presentdisclosure without creative efforts shall fall within the protectionscope of the present disclosure.

The terms “first”, “second”, and the like used in the specification, theclaims, and the accompany drawings of the present disclosure are used todistinguish different objects rather than describe a particular order.The terms “include”, “comprise”, and “have” as well as variationsthereof are intended to cover non-exclusive inclusion. For example, aprocess, method, system, product, or apparatus including a series ofsteps or units is not limited to the listed steps or units, on thecontrary, it can optionally include other steps or units that are notlisted; alternatively, other steps or units inherent to the process,method, product, or device can be included either.

The term “embodiment” or “implementation” referred to herein means thata particular feature, structure, or feature described in conjunctionwith the implementation may be contained in at least one implementationof the present disclosure. The phrase appearing in various places in thespecification does not necessarily refer to the same implementation, nordoes it refer to an independent or alternative implementation that ismutually exclusive with other implementations. It is expressly andimplicitly understood by those skilled in the art that an implementationdescribed herein may be combined with other implementations.

The terminal device involved in the implementations of the presentdisclosure may include various handheld devices, in-vehicle devices,wearable devices, computing devices that have wireless communicationfunctions or other processing devices connected to the wirelessscenario, as well as various forms of user equipments (UE), mobilestations (MS), terminal devices, and the like. For the convenience ofdescription, the above-mentioned devices are collectively referred to asa terminal device. An operating system related to the implementations ofthe disclosure is a software system that manages hardware resourcesuniformly and provides a user with a service interface.

As illustrated in FIG. 1A, a terminal device such as a smart phonegenerally has a program space for running programs. The program spaceincludes a user space and an operating system space (that is, a place toinstall the operating system). One or more applications, which aretarget applications installed on the terminal device, can run in theuser space. An operating system of the terminal device runs in theoperating system space. Examples of the operating system include but arenot limited to an Android® system, a mobile operating system iOS®developed by Apple®, etc. As illustrated in FIG. 1B, the followingdescribes the Android system runs on the terminal device as an example.In the case of Android system, the user space includes an applicationlayer of the Android system and the operating system space includes anapplication framework layer, Libraries and Android RunTime layer, andLinux Kernel layer of the Android system. The application layer includesvarious applications directly interacting with a user, or serviceprograms written in the Java language and running in the background, forexample, programs for implementing common basic functions on smartphones, such as short messaging service (SMS), telephone dialing,picture viewers, calendars, games, maps, world wide web (Web) browsers,etc., as well as other applications developed by developers. Theapplication framework layer provides a series of libraries required indeveloping Android applications, which can be used to reuse componentsas well as personalize extensions through inheritance. The Libraries andAndroid RunTime layer can support the application framework and provideservices for various components in the Android system. The Libraries andAndroid RunTime layer is consist of Libraries and Android RunTime. TheAndroid RunTime includes a core library and a Dalvik virtual machine.The Linux kernel layer is configured to implement core functions such ashardware device driving, process and memory management, network protocolstacks, power management, wireless communication, and the like.

In general design, the target application runs in the user space. Whenthe target application needs to perform operations such as sending data,reading disk data, and the like, standard interface functions providedby the operating system such as “write” and “send” should be invoked.That is, a central processing unit (CPU) invokes codes of the operatingsystem space to achieve request operations of the user. The operatingsystem of the terminal device generally improves allocation of systemresources (such as increasing a clock rate of the CPU, etc.) as a wholeto accelerate the target application.

In view of the above, implementations of the disclosure provide a methodfor resource allocation, aiming at the target application of theterminal device. With regard to the method, the operating system of theterminal device first acquires system-state information of the terminaldevice, where the terminal device has the target application running ina foreground of the terminal device. The operating system thendetermines an internal running scenario of the target applicationaccording to the system-state information. Thereafter, the operatingsystem acquires a performance improvement strategy corresponding to theinternal running scenario. At last, the operating system adjusts theallocation of the system resources for the internal running scenarioaccording to the performance improvement strategy. In the process ofrunning the target application in the foreground, the operating systemof the terminal device can accurately identify the internal runningscenario of the target application according to the system-stateinformation and acquire the performance improvement strategycorresponding to the internal running scenario, such that the allocationof the system resources for the internal running scenario can beaccurately adjusted. In this way, the target application does not needto deliver scenario information to the operating system, which isbeneficial to reducing signaling overheads between the targetapplication and the operating system and improving refinement andefficiency of adjusting the allocation of the system resources for thetarget application by the terminal device.

The following describes the implementations of the disclosure inconjunction with the accompanying drawings.

FIG. 2 is a schematic flow chart illustrating a method for resourceallocation according to an implementation of the present disclosure. Themethod is applicable to a terminal device. An operating system and atleast one application run in the terminal device. The at least oneapplication can include but not be limited to a photographyapplication(s), a game application(s), a video application(s), aninstant messaging application(s), and the like. As illustrated in FIG.2, the method begins with operations at block 201.

At block 201, the operating system acquires system-state information ofthe terminal device. The system-state information refers to stateinformation of the terminal device that can be detected by the operatingsystem. The terminal device has a target application running in aforeground of the terminal device.

The system-state information is configured to describe state-informationof the terminal device in a system level, including interactioninformation, a usage state of an internal device of the terminal device,and usage information of the system resources.

Examples of the target application may be a game application, a videoapplication, an instant messaging application, and the like. Thedisclosure is not limited thereto.

At block 202, the operating system determines an internal runningscenario of the target application according to the system-stateinformation.

The internal running scenario can refer to subdivision running scenariosof the target application during running. For example, an internalrunning scenario of a game application can be divided into a startingscenario, a mall scenario, a team battle scenario, and the likeaccording to running timing and function logic of the game application.The division strategy is not limited. The internal operation scenariocan be preset, such as preset by a mobile phone developer, a gamedeveloper, or a user. The disclosure is not particularly restricted.

The team battle scenario in the game application can refer to acollective confrontation of several players in groups (such as in gangs,in teams, and the like).

At block 203, the operating system acquires a performance improvementstrategy corresponding to the internal running scenario.

The performance improvement strategy can refer to an adjustment strategyof the system resources of the terminal device when the internal runningscenario is running. As one implementation, the performance improvementstrategy can include categories of system resources to be adjusted andan adjustment amount of the system resources of each category. Thesystem resources may include at least one of: memory resources, centralprocessing unit (CPU) resources, graphics processing unit (GPU)resources, display resources, network resources, and disk read/write IO(input/output) resources.

At block 204, the operating system adjusts allocation of systemresources for the internal running scenario according to the performanceimprovement strategy.

According to the implementation of the disclosure, the operating systemof the terminal device first acquires the system-state information ofthe terminal device, where the terminal device has the targetapplication running in the foreground of the terminal device. Theoperating system then determines the internal running scenario of thetarget application according to the system-state information.Thereafter, the operating system acquires the performance improvementstrategy corresponding to the internal running scenario. At last, theoperating system adjusts the allocation of the system resources for theinternal running scenario according to the performance improvementstrategy. During running the target application in the foreground, theoperating system of the terminal device can accurately identify theinternal running scenario of the target application according to thesystem-state information and acquire the performance improvementstrategy corresponding to the internal running scenario, as a result,the allocation of the system resources for the internal running scenariocan be accurately adjusted. In this way, the target application does notneed to deliver scenario information to the operating system, therebyreducing signaling overheads between the target application and theoperating system and improving refinement and efficiency of adjustingthe allocation of the system resources for the target application by theterminal device.

As one implementation, the system-state information includes interactioninformation. The operating system determines the internal runningscenario of the target application according to the system-stateinformation as follows. The operating system identifies the internalrunning scenario of the target application according to the interactioninformation.

The interaction information includes interaction information between theterminal device and the user, and interaction information with otherdevices. The disclosure is not limited herein.

As can be seen, in this implementation, the operating system can detectthe interaction information directly, that is, the operating system doesnot have to receive scenario information from the target applicationfirst and then identify the internal running scenario. It is possible toreduce signaling overheads and improve efficiency of the allocation ofthe system resources for the internal running scenario of the targetapplication.

As one implementation, the interaction information may include at leastone of: touch parameters of a touch operation on a touch display screenof the terminal device, voice information collected by a microphone ofthe terminal device, and data information received by the terminaldevice from a server.

As one implementation, the target application is a game application andthe internal running scenario is a team battle scenario. When theinteraction information includes the touch parameters of the touchoperation on the touch display screen of the terminal device, theoperating system identifies the internal running scenario of the targetapplication according to the interaction information as follows. Theoperating system determines that a current internal running scenario ofthe target application is the team battle scenario when detecting thatat least one of the touch parameters is greater than a preset touchparameter.

The touch parameter may include a touch frequency, the number oftouches, duration of the touch, or the like. The disclosure is notlimited herein. The preset touch parameter may have a value of 50times/second, 60 times/second, 100 times/second, or the like. Thedisclosure is not particularly restricted.

In this implementation, in the team battle scenario, the user needs tocontinuously operate a game character to play real-time game, so thetouch parameters of the touch operation in this scenario will meetcertain conditions. As the operating system of the terminal device candetect the touch operation directly, the operating system can directlydetermine that the internal running scenario of the game application isthe team battle scenario according to the touch parameters. That is tosay, the operating system can identify the team battle scenario withoutwaiting for scenario information delivered by the game application. Itis possible to reduce signaling overheads and improve efficiency of theallocation of the system resources for the team battle scenario of thegame application.

As one implementation, the target application is a game application andthe internal running scenario is a team battle scenario. When theinteraction information includes the voice information collected by themicrophone of the terminal device, the operating system identifies theinternal running scenario of the target application according to theinteraction information as follows. The operating system determines thatthe current internal running scenario of the target application is theteam battle scenario when identifying that the voice informationcontains a preset key field.

The preset key field can refer to a key field that is stronglyassociated with the team battle scenario, such as “get together”, “readyfor team battle”, and other exemplary fields.

In this implementation, since, in the team battle scenario, a playerwill enable the voice call function to realize real-time gamecommunication, voice information of the player generally contains a keyfield(s) strongly associated with the team battle scenario. Theoperating system of the terminal device can detect the voice informationcollected by the microphone directly, thereby determining that theinternal running scenario of the game application is the team battlescenario according to the voice information directly. That is to say,the operating system can identify the team battle scenario withoutwaiting for scenario information delivered by the game application. Itis possible to reduce signaling overheads and improve efficiency of theallocation of the system resources for the team battle scenario of thegame application.

As one implementation, the target application is a game application andthe internal running scenario is a team battle scenario. When theinteraction information includes the data information received by theterminal device from the server, the operating system identifies theinternal running scenario of the target application according to theinteraction information as follows. The operating system determines thatthe current internal running scenario of the target application is theteam battle scenario when identifying that the data information containsassociation information of a game character.

The association information of the game character can refer to datainformation associated with the game character in the team battlescenario, where the data information includes location information,action information (such as performing ability, running, jumping, etc.),state information (such as resurrection, blood volume, etc.), and thelike. The disclosure is not particularly restricted herein.

In this implementation, in the team battle scenario, a terminal of theplayer can receive the data information from the server in real time andthe data information contains information associated with the gamecharacter in the team battle scenario. The operating system of theterminal device can detect the data information from the serverdirectly, thereby determining that the internal running scenario of thegame application is the team battle scenario according to the datainformation directly. That is to say, the operating system can identifythe team battle scenario without waiting for scenario informationdelivered by the game application. It is possible to reduce signalingoverheads and improve efficiency of the allocation of the systemresources for the team battle scenario of the game application.

As one implementation, the system-state information includes a usagestate of an internal device of the terminal device. The operating systemdetermines the internal running scenario of the target applicationaccording to the system-state information as follows. The operatingsystem identifies the internal running scenario of the targetapplication according to the usage state of the internal device of theterminal device.

As one implementation, the internal device includes a microphone. Inanother implementation, the internal device can further include akeyboard, a touch screen, and the like, which is not limited in theimplementations of the present disclosure.

As one implementation, the target application is a game application andthe internal running scenario is a team battle scenario. The operatingsystem identifies the internal running scenario of the targetapplication according to the usage state of the internal device of theterminal device as follows. The operating system determines that acurrent internal running scenario of the target application is the teambattle scenario when detecting that a usage state of the microphone isan enabled state.

The usage state of the internal device includes an enabled state and adisabled state. In addition to the microphone, the internal deviceincludes various sensors and other internal devices, such as an infraredsensor, an acceleration sensor, a gyroscope, and the like. Thedisclosure is not limited herein.

In this implementation, in the team battle scenario, the terminal of theplayer will enable a corresponding internal device according to scenariorequirements of a current team battle scenario, for example, enable themicrophone to achieve voice chat. The operating system of the terminaldevice can detect the usage state of the microphone, thereby determiningthat the internal running scenario of the game application is the teambattle scenario according to the usage state directly. That is to say,the operating system can identify the team battle scenario withoutwaiting for scenario information delivered by the game application. Itis possible to reduce signaling overheads and improve efficiency of theallocation of the system resources for the team battle scenario of thegame application.

As one implementation, the system-state information includes usageinformation of the system resources. The operating system determines theinternal running scenario of the target application according to thesystem-state information as follows. The operating system identifies theinternal running scenario of the target application according to theusage information of the system resources.

In this implementation, due to some specific amplitude changes indemands on the system resources for some certain internal runningscenarios, such as a sudden increase or a sudden decrease in a dataamount invoked, the operating system can identify the internal runningscenario via detecting the usage information of the system resources. Inthis way, the target application does not need to send scenarioinformation to the operating system, thereby reducing signalingoverheads and improving refinement and efficiency of the allocation ofthe system resources for the internal scenario of the targetapplication.

As one implementation, the usage information of the system resourcesincludes a reading speed of disk data, and the disk data includes atleast one of animation resources and audio resources. The targetapplication is a game application and the internal running scenario is ateam battle scenario. The operating system identifies the internalrunning scenario of the target application according to the usageinformation of the system resources as follows. The operating systemdetermines that a current internal running scenario of the targetapplication is the team battle scenario when detecting that an increaseamount in a reading speed of the at least one of animation resources andaudio resources is greater than a preset threshold.

In this implementation, as, in the team battle scenario of the gameapplication, a large data amount of the animation resources and theaudio resources needs to be invoked, the operating system can detect asurge of the reading speed of the disk data, thereby identifying theteam battle scenario. That is to say, the operating system can directlyidentify the team battle scenario without waiting for scenarioinformation delivered by the game application. In this way, signalingoverheads can be reduced and efficiency of the allocation of the systemresources for the team battle scenario of the game application can beimproved.

As one implementation, the system resources may include at least one of:memory resources, central processing unit (CPU) resources, graphicsprocessing unit (GPU) resources, display resources, network resources,and disk read/write IO (input/output) resources.

Consistent with the implementations illustrated in FIG. 2, FIG. 3A is aschematic flow chart illustrating a method for resource allocationaccording to an implementation of the present disclosure. The method isapplicable to a terminal device. An operating system and at least oneapplication run in the terminal device. As illustrated in FIG. 3A, themethod begins with operations at block 3A01.

At block 3A01, the operating system acquires system-state information ofthe terminal device, where the system-state information is stateinformation of the terminal device that can be detected by the operatingsystem and the terminal device has a target application running in aforeground of the terminal device. The system-state information includesinteraction information and the interaction information is touchparameters of a touch operation on a touch display screen of theterminal device.

The target application is a game application and the internal runningscenario is a team battle scenario.

At block 3A02, the operating system determines that a current internalrunning scenario of the target application is the team battle scenariowhen detecting that at least one of the touch parameters is greater thana preset touch parameter.

At block 3A03, the operating system acquires a performance improvementstrategy corresponding to the team battle scenario.

At block 3A04, the operating system adjusts allocation of systemresources for the team battle scenario according to the performanceimprovement strategy.

According to the implementation of the disclosure, the operating systemof the terminal device first acquires the system-state information ofthe terminal device, where the terminal device has the targetapplication running in the foreground of the terminal device. Theoperating system then determines the internal running scenario of thetarget application according to the system-state information.Thereafter, the operating system acquires the performance improvementstrategy corresponding to the internal running scenario. At last, theoperating system adjusts the allocation of the system resources for theinternal running scenario according to the performance improvementstrategy. In the process of running the target application in theforeground, the operating system of the terminal device can accuratelyidentify the internal running scenario of the target applicationaccording to the system-state information and acquire the performanceimprovement strategy corresponding to the internal running scenario,such that the allocation of the system resources for the internalrunning scenario can be accurately adjusted. In this way, the targetapplication does not need to deliver scenario information to theoperating system, thereby reducing signaling overheads between thetarget application and the operating system and improving refinement andefficiency of adjusting the allocation of the system resources for thetarget application by the terminal device.

Moreover, in the team battle scenario, the user needs to continuouslyoperate a game character to perform real-time game, so the touchparameters of the touch operation in this scenario will meet certainconditions. As the operating system of the terminal device can detectthe touch operation directly, the operating system can directlydetermine that the internal running scenario of the game application isthe team battle scenario according to the touch parameters. That is tosay, the operating system can directly identify the team battle scenariowithout waiting for scenario information delivered by the gameapplication. It is possible to reduce signaling overheads and improveefficiency of the allocation of the system resources for the team battlescenario of the game application.

Consistent with the implementations illustrated in FIG. 2, FIG. 3B is aschematic flow chart illustrating a method for resource allocationaccording to an implementation of the present disclosure. The method isapplicable to a terminal device. An operating system and at least oneapplication run in the terminal device. As illustrated in FIG. 3B, themethod begins with operations at block 3B01.

At block 3B01, the operating system acquires system-state information ofthe terminal device, where the system-state information is stateinformation of the terminal device that can be detected by the operatingsystem and the terminal device has a target application running in aforeground of the terminal device. The system-state information includesinteraction information and the interaction information is voiceinformation collected by a microphone of the terminal device.

The target application is a game application and the internal runningscenario is a team battle scenario.

At block 3B02, the operating system determines that a current internalrunning scenario of the target application is the team battle scenariowhen identifying that the voice information contains a preset key field.

At block 3B03, the operating system acquires a performance improvementstrategy corresponding to the team battle scenario.

At block 3B04, the operating system adjusts allocation of systemresources for the team battle scenario according to the performanceimprovement strategy.

According to the implementation of the disclosure, the operating systemof the terminal device first acquires the system-state information ofthe terminal device, where the terminal device has the targetapplication running in the foreground of the terminal device. Theoperating system then determines the internal running scenario of thetarget application according to the system-state information.Thereafter, the operating system acquires the performance improvementstrategy corresponding to the internal running scenario. At last, theoperating system adjusts the allocation of the system resources for theinternal running scenario according to the performance improvementstrategy. During running the target application in the foreground, theoperating system of the terminal device can accurately identify theinternal running scenario of the target application according to thesystem-state information and acquire the performance improvementstrategy corresponding to the internal running scenario, such that theallocation of the system resources for the internal running scenario canbe accurately adjusted. In this way, the target application does notneed to deliver scenario information to the operating system, therebyreducing signaling overheads between the target application and theoperating system and improving refinement and efficiency of adjustingthe allocation of the system resources for the target application by theterminal device.

In this implementation, since, in the team battle scenario, a playerwill enable the voice call function to realize real-time gamecommunication, voice information of the player generally contains a keyfield strongly associated with the team battle scenario. The operatingsystem of the terminal device can detect the voice information collectedby the microphone directly, thereby determining that the internalrunning scenario of the game application is the team battle scenarioaccording to the voice information directly. That is to say, theoperating system can identify the team battle scenario without waitingfor scenario information delivered by the game application. It ispossible to reduce signaling overheads and improve efficiency of theallocation of the system resources for the team battle scenario of thegame application.

Consistent with the implementations illustrated in FIG. 2, FIG. 3C is aschematic flow chart illustrating a method for resource allocationaccording to an implementation of the present disclosure. The method isapplicable to a terminal device. An operating system and at least oneapplication run in the terminal device. As illustrated in FIG. 3C, themethod begins with operations at block 3C01.

At block 3C01, the operating system acquires system-state information ofthe terminal device, where the system-state information is stateinformation of the terminal device that can be detected by the operatingsystem and the terminal device has a target application running in aforeground of the terminal device. The system-state information includesinteraction information and the interaction information is datainformation received by the terminal device from a server.

The target application is a game application and the internal runningscenario is a team battle scenario.

At block 3C02, the operating system determines that a current internalrunning scenario of the target application is the team battle scenariowhen identifying that the data information contains associationinformation of a game character.

At block 3C03, the operating system acquires a performance improvementstrategy corresponding to the team battle scenario.

At block 3C04, the operating system adjusts allocation of systemresources for the team battle scenario according to the performanceimprovement strategy.

According to the implementation of the disclosure, the operating systemof the terminal device first acquires the system-state information ofthe terminal device, where the terminal device has the targetapplication running in the foreground of the terminal device. Theoperating system then determines the internal running scenario of thetarget application according to the system-state information.Thereafter, the operating system acquires the performance improvementstrategy corresponding to the internal running scenario. At last, theoperating system adjusts the allocation of the system resources for theinternal running scenario according to the performance improvementstrategy. In the process of running the target application in theforeground, the operating system of the terminal device can accuratelyidentify the internal running scenario of the target applicationaccording to the system-state information and acquire the performanceimprovement strategy corresponding to the internal running scenario andconsequently, the allocation of the system resources for the internalrunning scenario can be accurately adjusted. In this way, the targetapplication does not need to deliver scenario information to theoperating system, thereby reducing signaling overheads between thetarget application and the operating system and improving refinement andefficiency of adjusting the allocation of the system resources for thetarget application by the terminal device.

In this implementation, in the team battle scenario, a terminal of theplayer can receive the data information from the server in real time andthe data information contains information associated with the gamecharacter in the team battle scenario. The operating system of theterminal device can detect the data information from the serverdirectly, thereby determining that the internal running scenario of thegame application is the team battle scenario according to the datainformation directly. That is to say, the operating system can identifythe team battle scenario without waiting for scenario informationdelivered by the game application. It is possible to reduce signalingoverheads and improve efficiency of the allocation of the systemresources for the team battle scenario of the game application.

Consistent with the implementations illustrated in FIG. 2, FIG. 4 is aschematic flow chart illustrating a method for resource allocationaccording to an implementation of the present disclosure. The method isapplicable to a terminal device. An operating system and at least oneapplication run in the terminal device. As illustrated in FIG. 4, themethod begins with operations at block 401.

At block 401, the operating system acquires system-state information ofthe terminal device, where the system-state information is stateinformation of the terminal device that can be detected by the operatingsystem and the terminal device has a target application running in aforeground of the terminal device. The system-state information includesa usage state of an internal device of the terminal device, where theinternal device includes a microphone.

The target application is a game application and the internal runningscenario is a team battle scenario.

At block 402, the operating system determines that a current internalrunning scenario of the target application is the team battle scenariowhen detecting that a usage state of the microphone is an enabled state.

At block 403, the operating system acquires a performance improvementstrategy corresponding to the team battle scenario.

At block 404, the operating system adjusts allocation of systemresources for the team battle scenario according to the performanceimprovement strategy.

According to the implementation of the disclosure, the operating systemof the terminal device first acquires the system-state information ofthe terminal device, where the terminal device has the targetapplication running in the foreground of the terminal device. Theoperating system then determines the internal running scenario of thetarget application according to the system-state information.Thereafter, the operating system acquires the performance improvementstrategy corresponding to the internal running scenario. At last, theoperating system adjusts the allocation of the system resources for theinternal running scenario according to the performance improvementstrategy. In the process of running the target application in theforeground, the operating system of the terminal device can accuratelyidentify the internal running scenario of the target applicationaccording to the system-state information and acquire the performanceimprovement strategy corresponding to the internal running scenario,such that the allocation of the system resources for the internalrunning scenario can be accurately adjusted. In this way, the targetapplication does not need to deliver scenario information to theoperating system, thereby reducing signaling overheads between thetarget application and the operating system and improving refinement andefficiency of adjusting the allocation of the system resources for thetarget application by the terminal device.

In this implementation, in the team battle scenario, the terminal of theplayer will enable a corresponding internal device according to scenariorequirements of a current team battle scenario, for example, enable themicrophone to achieve voice chat. The operating system of the terminaldevice can detect the usage state of the microphone, thereby determiningthat the internal running scenario of the game application is the teambattle scenario according to the usage state directly. That is to say,the operating system can identify the team battle scenario withoutwaiting for scenario information delivered by the game application. Itis possible to reduce signaling overheads and improve efficiency of theallocation of the system resources for the team battle scenario of thegame application.

Consistent with the implementations illustrated in FIG. 2 to FIG. 4,FIG. 5 is a schematic structural diagram illustrating a terminal deviceaccording to an implementation of the present disclosure. At least oneapplication and an operating system run in the terminal device. Asillustrated in FIG. 5, the terminal device includes a processor 501, acomputer readable storage 502 such as a memory, and a communicationinterface 503. The memory is configured to store one or more programswhich are different from the foregoing at least one applications. Theone or more programs are configured to be executed by the processor 501and include instructions operable to execute the following operations.

System-state information of the terminal device is acquired, where thesystem-state information is state information of the terminal devicethat can be detected by the operating system and the terminal device hasa target application running in a foreground of the terminal device. Aninternal running scenario of the target application is determinedaccording to the system-state information. A performance improvementstrategy corresponding to the internal running scenario is acquired.Allocation of system resources for the internal running scenario isadjusted according to the performance improvement strategy.

According to the implementation of the disclosure, the operating systemof the terminal device first acquires the system-state information ofthe terminal device, where the terminal device has the targetapplication running in the foreground of the terminal device. Theoperating system then determines the internal running scenario of thetarget application according to the system-state information.Thereafter, the operating system acquires the performance improvementstrategy corresponding to the internal running scenario. At last, theoperating system adjusts the allocation of the system resources for theinternal running scenario according to the performance improvementstrategy. In the process of running the target application in theforeground, the operating system of the terminal device can accuratelyidentify the internal running scenario of the target applicationaccording to the system-state information and acquire the performanceimprovement strategy corresponding to the internal running scenario,such that the allocation of the system resources for the internalrunning scenario can be accurately adjusted. In this way, the targetapplication does not need to deliver scenario information to theoperating system, thereby reducing signaling overheads between thetarget application and the operating system and improving refinement andefficiency of adjusting the allocation of the system resources for thetarget application of the terminal device.

As one implementation, the system-state information includes interactioninformation. The instructions of the programs operable to execute thedetermining an internal running scenario of the target applicationaccording to the system-state information are operable to execute thefollowing.

The internal running scenario of the target application is identifiedaccording to the interaction information.

As one implementation, the interaction information includes at least oneof: touch parameters of a touch operation on a touch display screen ofthe terminal device, voice information collected by a microphone of theterminal device, and data information received by the terminal devicefrom a server.

As one implementation, the target application is a game application andthe internal running scenario is a team battle scenario. When theinteraction information includes the touch parameters of the touchoperation on the touch display screen of the terminal device, in termsof the identifying the internal running scenario of the targetapplication according to the interaction information, the instructionsof the programs are operable to execute the following.

Determine that a current internal running scenario of the targetapplication is the team battle scenario, when detecting that at leastone of the touch parameters is greater than a preset touch parameter.

When the interaction information includes the voice informationcollected by the microphone of the terminal device, in terms of theidentifying the internal running scenario of the target applicationaccording to the interaction information, the instructions of theprograms are operable to execute the following.

Determine that the current internal running scenario of the targetapplication is the team battle scenario when identifying that the voiceinformation contains a preset key field.

When the interaction information includes the data information receivedby the terminal device from the server, in terms of the identifying theinternal running scenario of the target application according to theinteraction information, the instructions of the programs are operableto execute the following.

Determine that the current internal running scenario of the targetapplication is the team battle scenario when identifying that the datainformation contains association information of a game character.

As one implementation, the system-state information includes a usagestate of an internal device of the terminal device. The instructions ofthe programs operable to execute the determining an internal runningscenario of the target application according to the system-stateinformation are operable to execute the following.

The internal running scenario of the target application is identifiedaccording to the usage state of the internal device of the terminaldevice.

As one implementation, the internal device includes a microphone.

As one implementation, the target application is a game application andthe internal running scenario is a team battle scenario.

As one implementation, in terms of the identifying the internal runningscenario of the target application according to the usage state of theinternal device of the terminal device, the instructions of the programsare operable to execute the following.

Determine that a current internal running scenario of the targetapplication is the team battle scenario when detecting that a usagestate of the microphone is an enabled state.

As one implementation, the system-state information includes usageinformation of the system resources. The instructions of the programsoperable to execute the determining an internal running scenario of thetarget application according to the system-state information areoperable to execute the following.

The internal running scenario of the target application is identifiedaccording to the usage information of the system resources.

As one implementation, the usage information of the system resourcesincludes a reading speed of disk data, and the disk data includes atleast one of animation resources and audio resources. The targetapplication is a game application and the internal running scenario is ateam battle scenario. In terms of the identifying the internal runningscenario of the target application according to the usage information ofthe system resources, the instructions of the programs are operable toexecute the following.

Determine that a current internal running scenario of the targetapplication is the team battle scenario when detecting that an increaseamount in a reading speed of the at least one of animation resources andaudio resources is greater than a preset threshold.

As one implementation, the system resources include at least one of:memory resources, central processing unit (CPU) resources, graphicsprocessing unit (GPU) resources, display resources, network resources,and disk read/write IO (input/output) resources.

FIG. 6 is a block diagram illustrating possible functional units of adevice for resource allocation involved in the above implementations.The device 600 includes an acquiring unit 601, a determining unit 602,and an adjusting unit 603.

The acquiring unit 601 is configured to acquire system-state informationof a terminal device, where the system-state information is stateinformation of the terminal device that can be detected by an operatingsystem and the terminal device has a target application running in aforeground of the terminal device. The determining unit 602 isconfigured to determine an internal running scenario of the targetapplication according to the system-state information. The acquiringunit 601 is further configured to acquire a performance improvementstrategy corresponding to the internal running scenario. The adjustingunit 603 is configured to adjust allocation of system resources for theinternal running scenario according to the performance improvementstrategy.

According to the implementation of the disclosure, the operating systemof the terminal device first acquires the system-state information ofthe terminal device, where the terminal device has the targetapplication running in the foreground of the terminal device. Theoperating system then determines the internal running scenario of thetarget application according to the system-state information.Thereafter, the operating system acquires the performance improvementstrategy corresponding to the internal running scenario. At last, theoperating system adjusts the allocation of the system resources for theinternal running scenario according to the performance improvementstrategy. In the process of running the target application in theforeground, the operating system of the terminal device can accuratelyidentify the internal running scenario of the target applicationaccording to the system-state information and acquire the performanceimprovement strategy corresponding to the internal running scenario,such that the allocation of the system resources for the internalrunning scenario can be accurately adjusted. In this way, the targetapplication does not need to deliver scenario information to theoperating system, thereby reducing signaling overheads between thetarget application and the operating system and improving refinement andefficiency of adjusting the allocation of the system resources for thetarget application by the terminal device.

As one implementation, the system-state information includes interactioninformation. The determining unit 602 configured to determine theinternal running scenario of the target application according to thesystem-state information is configured to identify the internal runningscenario of the target application according to the interactioninformation.

As one implementation, the interaction information includes at least oneof: touch parameters of a touch operation on a touch display screen ofthe terminal device, voice information collected by a microphone of theterminal device, and data information received by the terminal devicefrom a server.

As one implementation, the target application is a game application andthe internal running scenario is a team battle scenario. When theinteraction information includes the touch parameters of the touchoperation on the touch display screen of the terminal device, thedetermining unit 602 configured to identify the internal runningscenario of the target application according to the interactioninformation is configured to determine that a current internal runningscenario of the target application is the team battle scenario, whendetecting that at least one of the touch parameters is greater than apreset touch parameter.

When the interaction information includes the voice informationcollected by the microphone of the terminal device, the determining unit602 configured to identify the internal running scenario of the targetapplication according to the interaction information is configured todetermine that the current internal running scenario of the targetapplication is the team battle scenario when identifying that the voiceinformation contains a preset key field.

When the interaction information includes the data information receivedby the terminal device from the server, the determining unit 602configured to identify the internal running scenario of the targetapplication according to the interaction information is configured todetermine that the current internal running scenario of the targetapplication is the team battle scenario when identifying that the datainformation contains association information of a game character.

As one implementation, the system-state information includes a usagestate of an internal device of the terminal device. The determining unit602 configured to determine the internal running scenario of the targetapplication according to the system-state information is configured toidentify the internal running scenario of the target applicationaccording to the usage state of the internal device of the terminaldevice.

As one implementation, the internal device includes a microphone.

As one implementation, the target application is a game application andthe internal running scenario is a team battle scenario. The determiningunit 602 configured to identify the internal running scenario of thetarget application according to the usage state of the internal deviceof the terminal device is configured to determine that a currentinternal running scenario of the target application is the team battlescenario when detecting that a usage state of the microphone is anenabled state.

As one implementation, the system-state information includes usageinformation of the system resources. The determining unit 602 configuredto determine the internal running scenario of the target applicationaccording to the system-state information is configured to identify theinternal running scenario of the target application according to theusage information of the system resources.

As one implementation, the usage information of the system resourcesincludes a reading speed of disk data, and the disk data includes atleast one of animation resources and audio resources. The targetapplication is a game application and the internal running scenario is ateam battle scenario. The determining unit 602 configured to identifythe internal running scenario of the target application according to theusage information of the system resources is configured to determinethat a current internal running scenario of the target application isthe team battle scenario when detecting that an increase amount in areading speed of the at least one of animation resources and audioresources is greater than a preset threshold.

It is to be noted that, the device described in the deviceimplementation of the disclosure is presented in the form of functionalunits. The term “unit” used herein should be understood as the broadestmeaning as possible, and an object for implementing functions defined byeach “unit” may be, for example, an integrated circuit (ASIC), a singlecircuit, a processor (shared, dedicated, or chipset) and a memory forexecuting one or more software or firmware programs, a combinationallogic circuit, and/or other suitable components that can achieve theabove described functions.

The determining unit 602 and the adjusting unit 603 may be a processoror a controller, and the acquiring unit 601 may be a communicationinterface.

FIG. 7 is a schematic structural diagram illustrating a smart phone 700applicable to the above methods according to an implementation of thepresent disclosure. The smart phone 700 includes a housing 710, a touchscreen 720, a main board 730, a battery 740, and a sub-board 750. Themain board 730 is provided with a front camera 731, a processor 732, amemory 733, a power management chip 734, and the like. The sub-board 750is provided with a vibrator 751, an integrated audio cavity 752, a VOOCflash charging interface 753, and a fingerprint recognition module 754.

The smart phone 700 is configured to acquire system-state information ofa terminal device, where the system-state information is stateinformation of the terminal device that can be detected by an operatingsystem and the terminal device has a target application running in aforeground of the terminal device, to determine an internal runningscenario of the target application according to the system-stateinformation, to acquire a performance improvement strategy correspondingto the internal running scenario, and to adjust allocation of systemresources for the internal running scenario according to the performanceimprovement strategy.

The processor 732 is the control center of the smart phone and isconfigured to connect various parts of the whole smart phone throughvarious interfaces and lines, run or execute software programs and/ormodules stored in the memory 733, and invoke data stored in the memory733 to perform various functions of the mobile phone and process data,thereby monitoring the mobile phone as a whole. In at least oneimplementation, the processor 732 may include one or more processingunits. For example, the processor 732 may integrate an applicationprocessor and a modem processor, where the application processor isconfigured to handle the operating system, the user interface, theapplication, and so on, and the modem processor is mainly configured toprocess wireless communication. It will be understood that theabove-mentioned modem processor may not be integrated into the processor732. The processor 732 may be, for example, a central processing unit(CPU), a general-purpose processor, a digital signal processor (DSP), anapplication specific integrated circuit (ASIC), a field programmablegate array (FPGA), or other programmable logic devices, transistor logicdevices, hardware components, or any combination of the terminal device.Various exemplary logical blocks, modules, and circuits described inconjunction with the disclosure may be achieved or implemented. Theprocessor may also be a combination of computing functions, for example,a combination of one or more microprocessors, a combination of the DSPand the microprocessor, and the like.

The memory 733 is configured to store software programs and modules, andthe processor 732 is configured to execute various function applicationsand data processing of the mobile phone by running the software programsand the modules stored in the memory 733. The memory 733 mainly includesa program storage area and a data storage area. The program storage areamay store an operating system, applications required for at least onefunction, and so on. The data storage area may store data createdaccording to use of the smart phone, and so on. In addition, the memory733 may include a high-speed RAM, and may further include anon-transitory memory such as at least one disk storage device, a flashdevice, or other non-transitory solid storage devices. The memory 733may be, for example, a random access memory (RAM), a flash memory, aread only memory (ROM), an erasable programmable ROM (EPROM), anelectrically EPROM (EEPROM), a register, a hard disk, a mobile harddisk, a compact disc-read only memory (CD-ROM), or any other form ofstorage medium known in the art.

Implementations of the present disclosure also provide a computerstorage medium. The computer storage medium stores computer programs forelectronic data interchange which, when executed, are operable with acomputer to execute all or part of the operations of any of the methodsdescribed in the above-described method implementations. The computermay include a terminal device.

Implementations of the present disclosure also provide a computerprogram product. The computer program product includes a non-transitorycomputer readable storage medium that stores computer programs. Thecomputer programs are operable with a computer to perform all or part ofthe operations of any of the methods described in the above methodimplementations. The computer program product may be a softwareinstallation package and the computer may include a terminal device.

It is to be noted that, for the sake of simplicity, the foregoing methodimplementations are described as a series of action combinations,however, it will be appreciated by those skilled in the art that thepresent disclosure is not limited by the sequence of actions described.According to the present disclosure, certain steps or operations may beperformed in other order or simultaneously. Besides, it will beappreciated by those skilled in the art that the implementationsdescribed in the specification are exemplary and the actions and modulesinvolved are not necessarily essential to the present disclosure.

In the foregoing implementations, the description of each implementationhas its own emphasis. For the parts not described in detail in oneimplementation, reference may be made to related descriptions in otherimplementations.

In the implementations of the disclosure, the apparatus disclosed inimplementations provided herein may be implemented in other manners. Forexample, the device/apparatus implementations described above are merelyillustrative; for instance, the division of the unit is only a logicalfunction division and there can be other manners of division duringactual implementations, for example, multiple units or components may becombined or may be integrated into another system, or some features maybe ignored, omitted, or not performed. In addition, coupling orcommunication connection between each illustrated or discussed componentmay be direct coupling or communication connection, or may be indirectcoupling or communication among devices or units via some interfaces,and may be electrical connection, mechanical connection, or other formsof connection.

The units described as separate components may or may not be physicallyseparated, the components illustrated as units may or may not bephysical units, that is, they may be in the same place or may bedistributed to multiple network elements. All or part of the units maybe selected according to actual needs to achieve the purpose of thetechnical solutions of the implementations.

In addition, the functional units in various implementations of thepresent disclosure may be integrated into one processing unit, or eachunit may be physically present, or two or more units may be integratedinto one unit. The above-mentioned integrated unit can be implemented inthe form of hardware or a software function unit.

The integrated unit may be stored in a computer readable memory when itis implemented in the form of a software functional unit and is sold orused as a separate product. Based on such understanding, the technicalsolutions of the present disclosure essentially, or the part of thetechnical solutions that contributes to the related art, or all or partof the technical solutions, may be embodied in the form of a softwareproduct which is stored in a memory and includes instructions forcausing a computer device (which may be a personal computer, a server,or a network device and so on) to perform all or part of the stepsdescribed in the various implementations of the present disclosure. Thememory includes various medium capable of storing program codes, such asa USB (universal serial bus) flash disk, a read-only memory (ROM), arandom-access memory (RAM), a removable hard disk, Disk, compact disc(CD), or the like.

It will be understood by those of ordinary skill in the art that all ora part of the various methods of the implementations described above maybe accomplished by means of a program to instruct associated hardware,the program may be stored in a computer readable memory, which mayinclude a flash memory, a read-only memory (ROM), a random-access memory(RAM), Disk or compact disc (CD), and so on.

While the disclosure has been described in connection with certainimplementations, it is to be understood that the disclosure is not to belimited to the disclosed implementations but, on the contrary, isintended to cover various modifications and equivalent arrangementsincluded within the scope of the appended claims, which scope is to beaccorded the broadest interpretation so as to encompass all suchmodifications and equivalent structures as is permitted under the law.

What is claimed is:
 1. A method for resource allocation, applicable to aterminal device having an operating system and at least one applicationrunning in the terminal device, the method comprising: acquiring, by theoperating system of the terminal device, system-state information of theterminal device, wherein the system-state information is stateinformation of the terminal device that can be detected by the operatingsystem, and the terminal device has a game application running in aforeground of the terminal device, wherein the game application has apresent internal running scenario that comprises a team battle scenarioand a non-team battle scenario, wherein the system-state informationcomprises a usage state of a microphone of the terminal device, andwherein the usage state comprises an enabled state and a disabled state;determining, by the operating system, that the present internal runningscenario of the game application is the team battle scenario whendetecting that the usage state of the microphone is the enabled state;acquiring, by the operating system, a performance improvement strategycorresponding to the team battle scenario; adjusting, by the operatingsystem, allocation of system resources for the team battle scenarioaccording to the performance improvement strategy corresponding to theteam battle scenario; determining, by the operating system, that thepresent internal running scenario of the game application is thenon-team battle scenario when detecting that the usage state of themicrophone is the disabled state; acquiring, by the operating system, aperformance improvement strategy corresponding to the non-team battlescenario; and adjusting, by the operating system, allocation of systemresources for the non-team battle scenario according to the performanceimprovement strategy corresponding to the non-team battle scenario. 2.The method of claim 1, wherein the system-state information furthercomprises interaction information; and determining, by the operatingsystem, the present internal running scenario of the game applicationaccording to the system-state information comprises: identifying, by theoperating system, the present internal running scenario of the gameapplication according to the interaction information.
 3. The method ofclaim 2, wherein the interaction information comprises voice informationcollected by the microphone of the terminal device.
 4. The method ofclaim 3, wherein identifying, by the operating system, the presentinternal running scenario of the game application according to theinteraction information comprises: determining, by the operating system,that the present internal running scenario of the game application isthe team battle scenario when identifying that the voice informationcontains a preset key field.
 5. The method of claim 1, wherein thesystem resources comprise at least one of: memory resources, centralprocessing unit (CPU) resources, graphics processing unit (GPU)resources, display resources, network resources, and disk read/write IO(input/output) resources.
 6. A terminal device, comprising: at least oneprocessor; and a computer readable storage, coupled to the at least oneprocessor and storing at least one computer executable instructionthereon which, when executed by the at least one processor, causes theat least one processor to: acquire, by an operating system of theterminal device, system-state information of the terminal device,wherein the system-state information is state information of theterminal device that can be detected by the operating system, and theterminal device has a game application running in a foreground of theterminal device, wherein the game application has a present internalrunning scenario that comprises a team battle scenario and a non-teambattle scenario, wherein the system-state information comprises a usagestate of a microphone of the terminal device, and the usage statecomprises an enabled state and a disabled state; determine, by theoperating system, that the present internal running scenario of the gameapplication is the team battle scenario when detecting that the usagestate of the microphone is the enabled state; acquire, by the operatingsystem, a performance improvement strategy corresponding to the teambattle scenario; adjust, by the operating system, allocation of systemresources for the team battle scenario according to the performanceimprovement strategy corresponding to the team battle scenario;determine, by the operating system, that the present internal runningscenario of the game application is the non-team battle scenario whendetecting that the usage state of the microphone is the disabled state;acquire, by the operating system, a performance improvement strategycorresponding to the non-team battle scenario; and adjust, by theoperating system, allocation of system resources for the non-team battlescenario according to the performance improvement strategy correspondingto the non-team battle scenario.
 7. The terminal device of claim 6,wherein the system-state information further comprises interactioninformation; and when executed by the at least one processor, the atleast one computer executable instruction causes the at least oneprocessor to determine, by the operating system, the present internalrunning scenario of the game application according to the system-stateinformation further causes the at least one processor to: identify, bythe operating system, the present internal running scenario of the gameapplication according to the interaction information.
 8. The terminaldevice of claim 7, wherein the interaction information comprises voiceinformation collected by the microphone of the terminal device.
 9. Theterminal device of claim 8, wherein when the interaction informationcomprises the voice information collected by the microphone of theterminal device, when executed by the at least one processor, the atleast one computer executable instruction causes the at least oneprocessor to identify, by the operating system, the present internalrunning scenario of the game application according to the interactioninformation further causes the at least one processor to: determine, bythe operating system, that the present internal running scenario of thegame application is the team battle scenario when identifying that thevoice information contains a preset key field.
 10. A non-transitorycomputer-readable storage medium storing a computer program which, whenexecuted by a processor, causes the processor to: acquire, by anoperating system of a terminal device, system-state information of theterminal device, wherein the system-state information is stateinformation of the terminal device that can be detected by the operatingsystem, and the terminal device has a game application running in aforeground of the terminal device, wherein the game application has apresent internal running scenario that comprises a team battle scenarioand a non-team battle scenario, wherein the system-state informationcomprises a usage state of a microphone of the terminal device, andwherein the usage state comprises an enabled state and a disabled state;determine, by the operating system, that the present internal runningscenario of the game application is the team battle scenario whendetecting that the usage state of the microphone is the enabled state;acquire, by the operating system, a performance improvement strategycorresponding to the team battle scenario; adjust, by the operatingsystem, allocation of system resources for the team battle scenarioaccording to the performance improvement strategy corresponding to theteam battle scenario; determine, by the operating system, that thepresent internal running scenario of the game application is thenon-team battle scenario when detecting that the usage state of themicrophone is the disabled state; acquire, by the operating system, aperformance improvement strategy corresponding to the non-team battlescenario; and adjust, by the operating system, allocation of systemresources for the non-team battle scenario according to the performanceimprovement strategy corresponding to the non-team battle scenario.